package svnProjectGroupB;

import java.util.Collection;
import java.util.Iterator;

public class MainProgramClass {

	// By given collection output its type (set, list, etc.)
	void outputCollectionType(Collection collection) {
		// Todo
	}

	// //All elements will be of same type
	//  find the one object which is different
	//  it can be on any place
	void findDiffElement(Collection collection) {
		// Define the dominating objects' class
		if (collection.isEmpty() || collection.size() <= 2) {
			System.out.println("The collection is too small;");
			return;
		}

		Iterator iter = collection.iterator();
		boolean isSameClass = false;
		Object element1;
		Object element2;
		while (iter.hasNext() && isSameClass == false) {
			element1 = iter.next();
			element2 = element1.getClass();
		}
		//UNFINISHED

	}

	// Make another collection without that element
	Collection newCollectionOfSameElements(Collection collection) {
		ArrayList x = new ArrayList();
		x.addAll(collection);
		return x;
      //UNFINISHED
	}

	// Get the names of the methods in class whose objects are
	// in the last collection and print them.
	void getMethodsInClassOfTheObjects() {

	}

	// Serialize all objects to a file and send it to a given email.

	void serializeAndSendToMail() {

	}

}
